package com.boil.qz.safekavass.model;

import javax.persistence.*;
import java.io.Serializable;

/**
 * Created by ChenYong on 2017-05-26.
 * <br>
 * 微信发普通红包实体类。
 */
@Entity
@Table(name = "TB_WEIXIN_SENDREDPACK")
public class WeixinSendredpackEntity implements Serializable {
    /**
     * 序列化 ID
     */
    private static final long serialVersionUID = -7696026782504175711L;
    /**
     * 编号，主键
     */
    @Id
    @SequenceGenerator(name = "SgWeixinSendredpack", sequenceName = "SE_WEIXIN_SENDREDPACK", allocationSize = 1)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SgWeixinSendredpack")
    private Long id;
    /**
     * 商户订单号，唯一
     */
    private String mchBillno;
    /**
     * 商户号
     */
    private String mchId;
    /**
     * 公众账号 appid
     */
    private String wxappid;
    /**
     * 用户 openid
     */
    private String reOpenid;
    /**
     * 付款金额（单位：分）
     */
    private Integer totalAmount;
    /**
     * 微信单号
     */
    private String sendListid;
    /**
     * 签名
     */
    private String sign;
    /**
     * 返回状态码
     */
    private String returnCode;
    /**
     * 返回信息
     */
    private String returnMsg;
    /**
     * 业务结果
     */
    private String resultCode;
    /**
     * 错误代码
     */
    private String errCode;
    /**
     * 错误代码描述
     */
    private String errCodeDes;

    /**
     * 默认构造器。
     */
    public WeixinSendredpackEntity() {
        super();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getMchBillno() {
        return mchBillno;
    }

    public void setMchBillno(String mchBillno) {
        this.mchBillno = mchBillno;
    }

    public String getMchId() {
        return mchId;
    }

    public void setMchId(String mchId) {
        this.mchId = mchId;
    }

    public String getWxappid() {
        return wxappid;
    }

    public void setWxappid(String wxappid) {
        this.wxappid = wxappid;
    }

    public String getReOpenid() {
        return reOpenid;
    }

    public void setReOpenid(String reOpenid) {
        this.reOpenid = reOpenid;
    }

    public Integer getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(Integer totalAmount) {
        this.totalAmount = totalAmount;
    }

    public String getSendListid() {
        return sendListid;
    }

    public void setSendListid(String sendListid) {
        this.sendListid = sendListid;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public String getReturnCode() {
        return returnCode;
    }

    public void setReturnCode(String returnCode) {
        this.returnCode = returnCode;
    }

    public String getReturnMsg() {
        return returnMsg;
    }

    public void setReturnMsg(String returnMsg) {
        this.returnMsg = returnMsg;
    }

    public String getResultCode() {
        return resultCode;
    }

    public void setResultCode(String resultCode) {
        this.resultCode = resultCode;
    }

    public String getErrCode() {
        return errCode;
    }

    public void setErrCode(String errCode) {
        this.errCode = errCode;
    }

    public String getErrCodeDes() {
        return errCodeDes;
    }

    public void setErrCodeDes(String errCodeDes) {
        this.errCodeDes = errCodeDes;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        WeixinSendredpackEntity that = (WeixinSendredpackEntity) o;

        return id != null ? id.equals(that.id) : that.id == null;
    }

    @Override
    public int hashCode() {
        return id != null ? id.hashCode() : 0;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("WeixinSendredpackEntity{");
        sb.append("id=").append(id);
        sb.append(", mchBillno='").append(mchBillno).append('\'');
        sb.append(", mchId='").append(mchId).append('\'');
        sb.append(", wxappid='").append(wxappid).append('\'');
        sb.append(", reOpenid='").append(reOpenid).append('\'');
        sb.append(", totalAmount=").append(totalAmount);
        sb.append(", sendListid='").append(sendListid).append('\'');
        sb.append(", sign='").append(sign).append('\'');
        sb.append(", returnCode='").append(returnCode).append('\'');
        sb.append(", returnMsg='").append(returnMsg).append('\'');
        sb.append(", resultCode='").append(resultCode).append('\'');
        sb.append(", errCode='").append(errCode).append('\'');
        sb.append(", errCodeDes='").append(errCodeDes).append('\'');
        sb.append('}');
        return sb.toString();
    }
}